<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>CCControl Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">Cocos2D </a></h1>
				<a id="developerHome" href="../index.html">3.2.0</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">CCControl Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/block">&nbsp;&nbsp;&nbsp;&nbsp;block</option>
	
	<option value="//api/name/continuous">&nbsp;&nbsp;&nbsp;&nbsp;continuous</option>
	
	<option value="//api/name/enabled">&nbsp;&nbsp;&nbsp;&nbsp;enabled</option>
	
	<option value="//api/name/highlighted">&nbsp;&nbsp;&nbsp;&nbsp;highlighted</option>
	
	<option value="//api/name/maxSize">&nbsp;&nbsp;&nbsp;&nbsp;maxSize</option>
	
	<option value="//api/name/maxSizeType">&nbsp;&nbsp;&nbsp;&nbsp;maxSizeType</option>
	
	<option value="//api/name/preferredSize">&nbsp;&nbsp;&nbsp;&nbsp;preferredSize</option>
	
	<option value="//api/name/preferredSizeType">&nbsp;&nbsp;&nbsp;&nbsp;preferredSizeType</option>
	
	<option value="//api/name/selected">&nbsp;&nbsp;&nbsp;&nbsp;selected</option>
	
	<option value="//api/name/state">&nbsp;&nbsp;&nbsp;&nbsp;state</option>
	
	<option value="//api/name/touchInside">&nbsp;&nbsp;&nbsp;&nbsp;touchInside</option>
	
	<option value="//api/name/tracking">&nbsp;&nbsp;&nbsp;&nbsp;tracking</option>
	
	
	
	
	
	
	<option value="instance_methods">Instance Methods</option>
	
	<option value="//api/name/layout">&nbsp;&nbsp;&nbsp;&nbsp;- layout</option>
	
	<option value="//api/name/mouseDownEntered:">&nbsp;&nbsp;&nbsp;&nbsp;- mouseDownEntered:</option>
	
	<option value="//api/name/mouseDownExited:">&nbsp;&nbsp;&nbsp;&nbsp;- mouseDownExited:</option>
	
	<option value="//api/name/mouseUpInside:">&nbsp;&nbsp;&nbsp;&nbsp;- mouseUpInside:</option>
	
	<option value="//api/name/mouseUpOutside:">&nbsp;&nbsp;&nbsp;&nbsp;- mouseUpOutside:</option>
	
	<option value="//api/name/needsLayout">&nbsp;&nbsp;&nbsp;&nbsp;- needsLayout</option>
	
	<option value="//api/name/setTarget:selector:">&nbsp;&nbsp;&nbsp;&nbsp;- setTarget:selector:</option>
	
	<option value="//api/name/setValue:forKey:state:">&nbsp;&nbsp;&nbsp;&nbsp;- setValue:forKey:state:</option>
	
	<option value="//api/name/stateChanged">&nbsp;&nbsp;&nbsp;&nbsp;- stateChanged</option>
	
	<option value="//api/name/touchEntered:withEvent:">&nbsp;&nbsp;&nbsp;&nbsp;- touchEntered:withEvent:</option>
	
	<option value="//api/name/touchExited:withEvent:">&nbsp;&nbsp;&nbsp;&nbsp;- touchExited:withEvent:</option>
	
	<option value="//api/name/touchUpInside:withEvent:">&nbsp;&nbsp;&nbsp;&nbsp;- touchUpInside:withEvent:</option>
	
	<option value="//api/name/touchUpOutside:withEvent:">&nbsp;&nbsp;&nbsp;&nbsp;- touchUpOutside:withEvent:</option>
	
	<option value="//api/name/triggerAction">&nbsp;&nbsp;&nbsp;&nbsp;- triggerAction</option>
	
	<option value="//api/name/valueForKey:state:">&nbsp;&nbsp;&nbsp;&nbsp;- valueForKey:state:</option>
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Controlling Content Size">Controlling Content Size</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Setting and Getting Control Attributes">Setting and Getting Control Attributes</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Receiving Action Callbacks">Receiving Action Callbacks</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Subclass Methods">Subclass Methods</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/block">block</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/continuous">continuous</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/enabled">enabled</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/highlighted">highlighted</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/maxSize">maxSize</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/maxSizeType">maxSizeType</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/preferredSize">preferredSize</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/preferredSizeType">preferredSizeType</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/selected">selected</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/state">state</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchInside">touchInside</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/tracking">tracking</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/layout">layout</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mouseDownEntered:">mouseDownEntered:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mouseDownExited:">mouseDownExited:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mouseUpInside:">mouseUpInside:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/mouseUpOutside:">mouseUpOutside:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/needsLayout">needsLayout</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setTarget:selector:">setTarget:selector:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setValue:forKey:state:">setValue:forKey:state:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/stateChanged">stateChanged</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchEntered:withEvent:">touchEntered:withEvent:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchExited:withEvent:">touchExited:withEvent:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchUpInside:withEvent:">touchUpInside:withEvent:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchUpOutside:withEvent:">touchUpOutside:withEvent:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/triggerAction">triggerAction</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/valueForKey:state:">valueForKey:state:</a></span></li>
	
</ul></li>


			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="CCControl Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">CCControl Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value"><a href="../Classes/CCNode.html">CCNode</a> : <a href="../Classes/CCResponder.html">CCResponder</a> : NSObject</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">CCControl.h</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>CCControl is the abstract base class of the Cocos2d components that handles touches or mouse events. You cannot instantiate it directly, instead use one of its sub-classes, such as <a href="../Classes/CCButton.html">CCButton</a>. If you need to create a new sort of component you should make a sub-class of this class.</p>

<p>The control class handles events and its sub-classes will use child nodes to draw itself in the node heirarchy.</p>

<p><em>Important:</em> If you are sub-classing CCControl you will need to include the CCControlSubclass.h file as it includes methods that are otherwise not exposed.</p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						<a title="Controlling Content Size" name="task_Controlling Content Size"></a>
						<h3 class="subsubtitle task-title">Controlling Content Size</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/preferredSize">&nbsp;&nbsp;preferredSize</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/preferredSizeType">&nbsp;&nbsp;preferredSizeType</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/maxSize">&nbsp;&nbsp;maxSize</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/maxSizeType">&nbsp;&nbsp;maxSizeType</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Setting and Getting Control Attributes" name="task_Setting and Getting Control Attributes"></a>
						<h3 class="subsubtitle task-title">Setting and Getting Control Attributes</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/state">&nbsp;&nbsp;state</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/enabled">&nbsp;&nbsp;enabled</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/selected">&nbsp;&nbsp;selected</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/highlighted">&nbsp;&nbsp;highlighted</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/continuous">&nbsp;&nbsp;continuous</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/tracking">&nbsp;&nbsp;tracking</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/touchInside">&nbsp;&nbsp;touchInside</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Receiving Action Callbacks" name="task_Receiving Action Callbacks"></a>
						<h3 class="subsubtitle task-title">Receiving Action Callbacks</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/block">&nbsp;&nbsp;block</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setTarget:selector:">&ndash;&nbsp;setTarget:selector:</a></code>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Subclass Methods" name="task_Subclass Methods"></a>
						<h3 class="subsubtitle task-title">Subclass Methods</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/triggerAction">&ndash;&nbsp;triggerAction</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/stateChanged">&ndash;&nbsp;stateChanged</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/needsLayout">&ndash;&nbsp;needsLayout</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/layout">&ndash;&nbsp;layout</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setValue:forKey:state:">&ndash;&nbsp;setValue:forKey:state:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/valueForKey:state:">&ndash;&nbsp;valueForKey:state:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/touchEntered:withEvent:">&ndash;&nbsp;touchEntered:withEvent:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/touchExited:withEvent:">&ndash;&nbsp;touchExited:withEvent:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/touchUpInside:withEvent:">&ndash;&nbsp;touchUpInside:withEvent:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/touchUpOutside:withEvent:">&ndash;&nbsp;touchUpOutside:withEvent:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/mouseDownEntered:">&ndash;&nbsp;mouseDownEntered:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/mouseDownExited:">&ndash;&nbsp;mouseDownExited:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/mouseUpInside:">&ndash;&nbsp;mouseUpInside:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/mouseUpOutside:">&ndash;&nbsp;mouseUpOutside:</a></code>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/block" title="block"></a>
	<h3 class="subsubtitle method-title">block</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>A block that handles action callbacks sent by the control. Use either the block property or the <a href="#//api/name/setTarget:selector:">setTarget:selector:</a> method to receive actions from controls.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, copy) void ( ^ ) ( id sender ) block</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/continuous" title="continuous"></a>
	<h3 class="subsubtitle method-title">continuous</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>True if the control continously should generate events when it&rsquo;s value is changed. E.g. this can be used by slider controls.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL continuous</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/enabled" title="enabled"></a>
	<h3 class="subsubtitle method-title">enabled</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Determines if the control is currently enabled.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL enabled</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/highlighted" title="highlighted"></a>
	<h3 class="subsubtitle method-title">highlighted</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Determines if the control is currently highlighted. E.g. this corresponds to the down <a href="#//api/name/state">state</a> of a button</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL highlighted</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/maxSize" title="maxSize"></a>
	<h3 class="subsubtitle method-title">maxSize</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The maximum size that the component will <a href="#//api/name/layout">layout</a> to, the component will not be larger than this size and will instead shrink its content if needed.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGSize maxSize</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/maxSizeType" title="maxSizeType"></a>
	<h3 class="subsubtitle method-title">maxSizeType</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The content size type that the <a href="#//api/name/preferredSize">preferredSize</a> is using. Please refer to the <a href="../Classes/CCNode.html">CCNode</a> documentation on how to use content size types.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CCSizeType maxSizeType</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/preferredSize" title="preferredSize"></a>
	<h3 class="subsubtitle method-title">preferredSize</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The preferred (and minimum) size that the component will attempt to <a href="#//api/name/layout">layout</a> to. If its contents are larger it may have a larger size.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGSize preferredSize</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/preferredSizeType" title="preferredSizeType"></a>
	<h3 class="subsubtitle method-title">preferredSizeType</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The content size type that the <a href="#//api/name/preferredSize">preferredSize</a> is using. Please refer to the <a href="../Classes/CCNode.html">CCNode</a> documentation on how to use content size types.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CCSizeType preferredSizeType</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/selected" title="selected"></a>
	<h3 class="subsubtitle method-title">selected</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Determines if the control is currently selected. E.g. this is used by toggle buttons to handle the on <a href="#//api/name/state">state</a>.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL selected</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/state" title="state"></a>
	<h3 class="subsubtitle method-title">state</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Sets or retrieves the current state of the control. It&rsquo;s often easier to use the <a href="#//api/name/enabled">enabled</a>, <a href="#//api/name/highlighted">highlighted</a> and <a href="#//api/name/selected">selected</a> properties to indirectly set or read this property. This property is stored as a bit-mask.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CCControlState state</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/touchInside" title="touchInside"></a>
	<h3 class="subsubtitle method-title">touchInside</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>True if the control currently has a touch or a mouse event within its bounds.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL touchInside</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/tracking" title="tracking"></a>
	<h3 class="subsubtitle method-title">tracking</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>True if the control is currently tracking touches or mouse events. That is, if the user has touched down in the component but not lifted his finger (the actual touch may be outside the component).</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) BOOL tracking</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Instance Methods" name="instance_methods"></a>
						<h2 class="subtitle subtitle-methods">Instance Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/layout" title="layout"></a>
	<h3 class="subsubtitle method-title">layout</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub classes. Override this method to do any layout needed by the component. This can include setting positions or sizes of child labels or sprites as well as the compontents contentSize.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)layout</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/mouseDownEntered:" title="mouseDownEntered:"></a>
	<h3 class="subsubtitle method-title">mouseDownEntered:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a mouse down enters the component. By default this happes if the mouse down is within the control, if the claimsUserEvents property is set to false this will also happen if the mouse down starts outside of the control.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)mouseDownEntered:(NSEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the mouse down.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/mouseDownExited:" title="mouseDownExited:"></a>
	<h3 class="subsubtitle method-title">mouseDownExited:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a mouse down exits the component.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)mouseDownExited:(NSEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the mouse down.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/mouseUpInside:" title="mouseUpInside:"></a>
	<h3 class="subsubtitle method-title">mouseUpInside:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a mouse down that started inside the component is ended inside the component. E.g. for <a href="../Classes/CCButton.html">CCButton</a>, this triggers the buttons callback action.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)mouseUpInside:(NSEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the mouse up.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/mouseUpOutside:" title="mouseUpOutside:"></a>
	<h3 class="subsubtitle method-title">mouseUpOutside:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a mouse down that started inside the component is ended outside the component. E.g. for <a href="../Classes/CCButton.html">CCButton</a>, this doesn&rsquo;t trigger any callback action.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)mouseUpOutside:(NSEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the mouse up.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/needsLayout" title="needsLayout"></a>
	<h3 class="subsubtitle method-title">needsLayout</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. This method should be called whenever the control needs to update its <a href="#//api/name/layout">layout</a>. It will force a call to the <a href="#//api/name/layout">layout</a> method at the beginning of the next draw cycle.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)needsLayout</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setTarget:selector:" title="setTarget:selector:"></a>
	<h3 class="subsubtitle method-title">setTarget:selector:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Sets a target and selector that should be called when an action is triggered by the control. Actions are generated when buttons are clicked, sliders are dragged etc. You can also set the action callback using the <a href="#//api/name/block">block</a> property.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)setTarget:(id)<em>target</em> selector:(SEL)<em>selector</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>target</em></dt>
			<dd><p>The target object.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>selector</em></dt>
			<dd><p>Selector to call on the target object.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControl.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setValue:forKey:state:" title="setValue:forKey:state:"></a>
	<h3 class="subsubtitle method-title">setValue:forKey:state:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Override this method if you are using custom properties and need to set them by name using the setValue:forKey method. This is needed for integration with editors such as SpriteBuilder. When overriding this method, make sure to call its super method if you cannot handle the key.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)setValue:(id)<em>value</em> forKey:(NSString *)<em>key</em> state:(CCControlState)<em>state</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>value</em></dt>
			<dd><p>The value to set.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>key</em></dt>
			<dd><p>The key to set the value for.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>state</em></dt>
			<dd><p>The <a href="#//api/name/state">state</a> to set the value for.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/stateChanged" title="stateChanged"></a>
	<h3 class="subsubtitle method-title">stateChanged</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. This method is called every time the control&rsquo;s <a href="#//api/name/state">state</a> changes, it&rsquo;s default behavior is to call the <a href="#//api/name/needsLayout">needsLayout</a> method.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)stateChanged</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/touchEntered:withEvent:" title="touchEntered:withEvent:"></a>
	<h3 class="subsubtitle method-title">touchEntered:withEvent:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a touch enters the component. By default this happes if the touch down is within the control, if the claimsUserEvents property is set to false this will also happen if the touch starts outside of the control.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)touchEntered:(UITouch *)<em>touch</em> withEvent:(UIEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>touch</em></dt>
			<dd><p>Touch that entered the component.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the touch.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/touchExited:withEvent:" title="touchExited:withEvent:"></a>
	<h3 class="subsubtitle method-title">touchExited:withEvent:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a touch exits the component.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)touchExited:(UITouch *)<em>touch</em> withEvent:(UIEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>touch</em></dt>
			<dd><p>Touch that exited the component</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the touch.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/touchUpInside:withEvent:" title="touchUpInside:withEvent:"></a>
	<h3 class="subsubtitle method-title">touchUpInside:withEvent:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a touch that started inside the component is ended inside the component. E.g. for <a href="../Classes/CCButton.html">CCButton</a>, this triggers the buttons callback action.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)touchUpInside:(UITouch *)<em>touch</em> withEvent:(UIEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>touch</em></dt>
			<dd><p>Touch that is released inside the component.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the touch.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/touchUpOutside:withEvent:" title="touchUpOutside:withEvent:"></a>
	<h3 class="subsubtitle method-title">touchUpOutside:withEvent:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Called when a touch that started inside the component is ended outside the component. E.g. for <a href="../Classes/CCButton.html">CCButton</a>, this doesn&rsquo;t trigger any callback action.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)touchUpOutside:(UITouch *)<em>touch</em> withEvent:(UIEvent *)<em>event</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>touch</em></dt>
			<dd><p>Touch that is release outside of the component.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>event</em></dt>
			<dd><p>Event associated with the touch.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/triggerAction" title="triggerAction"></a>
	<h3 class="subsubtitle method-title">triggerAction</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. This method is called to trigger an action callback. E.g. <a href="../Classes/CCButton.html">CCButton</a> calls this method when the button is tapped.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)triggerAction</code></div>

    
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/valueForKey:state:" title="valueForKey:state:"></a>
	<h3 class="subsubtitle method-title">valueForKey:state:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Used by sub-classes. Override this method to return values of custom properties that are set by <a href="#//api/name/state">state</a>.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id)valueForKey:(NSString *)<em>key</em> state:(CCControlState)<em>state</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>key</em></dt>
			<dd><p>The key to retrieve the value for.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>state</em></dt>
			<dd><p>The <a href="#//api/name/state">state</a> to retrieve the value for.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The value for the specified key and value or <code>NULL</code> if no such value exist.</p>
	</div>
	
	
	
	
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/setValue:forKey:state:">- setValue:forKey:state:</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">CCControlSubclass.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 3.2.0. All rights reserved. (Last updated: 2014-08-12)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>